// Do file that conducts the analyses of the Swedidsh Data presented in the paper "Persistent Inequalities


*capture log close
log using "C:\Userdata\Shared\Logs\AdoptionStudy\TransmissionResults8210.log", text replace 

use "E:\ProjData\AdoptionStudy/SampleStacked.dta", clear

set mat 2000

******************
***DESCRIPTIVES***
******************

***TABLE 1***

gen ValAlderNum = .
replace ValAlderNum = 1970-FodAr if ValAr==1
replace ValAlderNum = 1982-FodAr if ValAr==2
replace ValAlderNum = 1994-FodAr if ValAr==3
replace ValAlderNum = 1994-FodAr if ValAr==4
replace ValAlderNum = 2010-FodAr if ValAr==5

foreach name in BioMor BioFar AdMor AdFar {
gen `name'ValAlderNum = .
replace `name'ValAlderNum = 1970-`name'FodAr if ValAr==1
replace `name'ValAlderNum = 1982-`name'FodAr if ValAr==2
replace `name'ValAlderNum = 1994-`name'FodAr if ValAr==3
replace `name'ValAlderNum = 1994-`name'FodAr if ValAr==4
replace `name'ValAlderNum = 2010-`name'FodAr if ValAr==5
}

keep if Rost!=.
keep if inrange(ValAlder, 0, 32)
keep if inrange(ValAr, 2, 5)


preserve
drop if ValAr==4


*Number of obs per individual
bysort LopNr: gen occ = _n
bysort LopNr: egen RostObs = count(Rost)
sum RostObs if (BioFAlla==1 | AdFAlla==1) & occ==1
sum RostObs if Adoption!=1 & BioFAlla==1 & occ==1
sum RostObs if AdoptionSv==1 & AdFAlla==1 & occ==1
sum RostObs if AdoptionUtl==1 & AdFAlla==1 & occ==1
drop occ

*Number of individuals and obs in the samples
distinct LopNr if Adoption!=1 & BioFAlla==1
distinct LopNr if AdoptionSv==1 & AdFAlla==1
distinct LopNr if AdoptionUtl==1 & AdFAlla==1


*Descriptives per individual - children
*Turnout: Use average turnout across all the elections for which we have info for the children and parents
*Education: Use cohort residualized years of schooling

restore


preserve

drop if ValAr==4

bysort LopNr: egen RostCum = mean(Rost)

*Average age at election
bysort LopNr: egen meanValAlderNum = mean(ValAlderNum)

bysort LopNr: gen occ = _n
keep if occ==1

*Diff from within cohort average of years of schooling
qui reg UtbAr i.FodAr
predict resUtbAr, residuals

*Residualize turnout to account for age differences
qui reg RostCum i.FodAr
predict resRostCum, residuals


*Ownbirth sample
sum FodAr meanValAlderNum resUtbAr RostCum resRostCum if Adoption!=1 & BioFAlla==1

*Native adoption sample
sum FodAr meanValAlderNum resUtbAr RostCum resRostCum if AdoptionSv==1 & AdFAlla==1

*Transnational adoption sample
sum FodAr meanValAlderNum resUtbAr RostCum resRostCum if AdoptionUtl==1 & AdFAlla==1

restore



*Descriptives per individual - parents
*Turnout: Use average turnout across all the elections for which we have info for the children and parents
*Education: Use cohort residualized years of schooling

*Generate separate files for each set of parents
foreach name in Mor Far {
preserve

drop if ValAr==4

keep if Adoption!=1
keep LopNr LopNrBio`name' FodAr Adoption Bio`name'FodAr Bio`name'UtbAr Bio`name'Klass Bio`name'RostCum BioFAlla Bio`name'ValAlderNum
rename LopNrBio`name' LopNr`name'
rename Bio`name'FodAr `name'FodAr
rename Bio`name'UtbAr `name'UtbAr
rename Bio`name'Klass `name'Klass
rename Bio`name'RostCum `name'RostCum
rename Bio`name'ValAlderNum `name'ValAlderNum


bysort LopNr: gen occ = _n
keep if occ==1
drop LopNr occ

*Average age at birth of children
bysort LopNr`name': egen occ = mean(FodAr)
gen `name'AlderFodelse = occ-`name'FodAr
drop FodAr occ

*Average age at election
bysort LopNr`name': egen mean`name'ValAlderNum = mean(`name'ValAlderNum)

bysort LopNr`name': gen occ = _n
keep if occ==1
drop occ

save "C:\Userdata\Shared\Dofiles\PrelDoFiles\PrelSven/Ownbirth`name'.dta", replace

restore
}


foreach name in Mor Far {
preserve

drop if ValAr==4

keep if AdoptionSv==1
keep LopNr LopNrBio`name' FodAr Adoption Bio`name'FodAr Bio`name'UtbAr Bio`name'Klass Bio`name'RostCum AdFAlla AdoptionSv Bio`name'ValAlderNum
rename LopNrBio`name' LopNr`name'
rename Bio`name'FodAr `name'FodAr
rename Bio`name'UtbAr `name'UtbAr
rename Bio`name'Klass `name'Klass
rename Bio`name'RostCum `name'RostCum
rename Bio`name'ValAlderNum `name'ValAlderNum

bysort LopNr: gen occ = _n
keep if occ==1
drop LopNr occ

*Average age at birth of children
bysort LopNr`name': egen occ = mean(FodAr)
gen `name'AlderFodelse = occ-`name'FodAr
drop FodAr occ

*Average age at election
bysort LopNr`name': egen mean`name'ValAlderNum = mean(`name'ValAlderNum)

bysort LopNr`name': gen occ = _n
keep if occ==1
drop occ

save "C:\Userdata\Shared\Dofiles\PrelDoFiles\PrelSven/NativeBio`name'.dta", replace

restore
}


foreach name in Mor Far {
preserve

drop if ValAr==4

keep if AdoptionSv==1
keep LopNr LopNrAd`name' FodAr Adoption Ad`name'FodAr Ad`name'UtbAr Ad`name'Klass Ad`name'RostCum AdFAlla AdoptionSv Ad`name'ValAlderNum
rename LopNrAd`name' LopNr`name'
rename Ad`name'FodAr `name'FodAr
rename Ad`name'UtbAr `name'UtbAr
rename Ad`name'Klass `name'Klass
rename Ad`name'RostCum `name'RostCum
rename Ad`name'ValAlderNum `name'ValAlderNum

bysort LopNr: gen occ = _n
keep if occ==1
drop LopNr occ

*Average age at birth of children
bysort LopNr`name': egen occ = mean(FodAr)
gen `name'AlderFodelse = occ-`name'FodAr
drop FodAr occ

*Average age at election
bysort LopNr`name': egen mean`name'ValAlderNum = mean(`name'ValAlderNum)

bysort LopNr`name': gen occ = _n
keep if occ==1
drop occ

gen Ad`name' = 1

save "C:\Userdata\Shared\Dofiles\PrelDoFiles\PrelSven/NativeAd`name'.dta", replace

restore
}


foreach name in Mor Far {
preserve

drop if ValAr==4

keep if AdoptionUtl==1
keep LopNr LopNrAd`name' FodAr Adoption Ad`name'FodAr Ad`name'UtbAr Ad`name'Klass Ad`name'RostCum AdFAlla AdoptionUtl Ad`name'ValAlderNum
rename LopNrAd`name' LopNr`name'
rename Ad`name'FodAr `name'FodAr
rename Ad`name'UtbAr `name'UtbAr
rename Ad`name'Klass `name'Klass
rename Ad`name'RostCum `name'RostCum
rename Ad`name'ValAlderNum `name'ValAlderNum

bysort LopNr: gen occ = _n
keep if occ==1
drop LopNr occ

*Average age at birth of children
bysort LopNr`name': egen occ = mean(FodAr)
gen `name'AlderFodelse = occ-`name'FodAr
drop FodAr occ

*Average age at election
bysort LopNr`name': egen mean`name'ValAlderNum = mean(`name'ValAlderNum)

bysort LopNr`name': gen occ = _n
keep if occ==1
drop occ

save "C:\Userdata\Shared\Dofiles\PrelDoFiles\PrelSven/Trans`name'.dta", replace

restore
}


preserve

drop if ValAr==4

foreach name in Mor Far {
use "C:\Userdata\Shared\Dofiles\PrelDoFiles\PrelSven/Ownbirth`name'.dta", clear
append using "C:\Userdata\Shared\Dofiles\PrelDoFiles\PrelSven/NativeBio`name'.dta"
append using "C:\Userdata\Shared\Dofiles\PrelDoFiles\PrelSven/NativeAd`name'.dta"
append using "C:\Userdata\Shared\Dofiles\PrelDoFiles\PrelSven/Trans`name'.dta"

*Diff from within cohort average of years of schooling
qui reg `name'UtbAr i.`name'FodAr
predict res`name'UtbAr, residuals

*Ownbirth parents
sum `name'FodAr mean`name'ValAlderNum `name'AlderFodelse res`name'UtbAr `name'Klass `name'RostCum if Adoption!=1 & BioFAlla==1

*Native adoption bio parents
sum `name'FodAr mean`name'ValAlderNum `name'AlderFodelse res`name'UtbAr `name'Klass `name'RostCum if AdoptionSv==1 & AdFAlla==1 & Ad`name'!=1

*Native adoption ad parents
sum `name'FodAr mean`name'ValAlderNum `name'AlderFodelse res`name'UtbAr `name'Klass `name'RostCum if AdoptionSv==1 & AdFAlla==1 & Ad`name'==1

*Transnational adoption parents
sum `name'FodAr mean`name'ValAlderNum `name'AlderFodelse res`name'UtbAr `name'Klass `name'RostCum if AdoptionUtl==1 & AdFAlla==1
}

restore


*************
***RESULTS***
*************

***TABLE 2***
preserve

drop if ValAr==4

local EjAdoptFor "BioFRostCum1 i.BioFFodAr Kon i.ValAlder i.ValAr"
local EjAdoptMF "BioMorRostCum1 BioFarRostCum1 i.BioMorFodAr i.BioFarFodAr Kon i.ValAlder i.ValAr"
local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptFor "AdFRostCum1 i.AdFFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptMF "AdMorRostCum1 AdFarRostCum1 i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local AllaFor "c.FRostCum1##c.EjAdoption i.FFodAr##c.EjAdoption c.Kon##c.EjAdoption i.ValAlder##c.EjAdoption i.ValAr##c.EjAdoption"
local AllaMF "c.MorRostCum1##c.EjAdoption c.FarRostCum1##c.EjAdoption i.MorFodAr##c.EjAdoption i.FarFodAr##c.EjAdoption c.Kon##c.EjAdoption i.ValAlder##c.EjAdoption i.ValAr##c.EjAdoption"


***Transmission across two generations - baseline***
*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum1
sum BioFRostCum1 if e(sample)
sum Rost if e(sample)

qui reg Rost `EjAdoptMF' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
sum BioMorRostCum1 if e(sample)
sum BioFarRostCum1 if e(sample)
sum Rost if e(sample)


*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
lincom BioFRostCum1 + AdFRostCum1
sum BioFRostCum1 if e(sample)
sum AdFRostCum1 if e(sample)
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
lincom BioMorRostCum1 + AdMorRostCum1
lincom BioFarRostCum1 + AdFarRostCum1
lincom BioMorRostCum1 - BioFarRostCum1
lincom AdMorRostCum1 - AdFarRostCum1
sum BioMorRostCum1 if e(sample)
sum BioFarRostCum1 if e(sample)
sum AdMorRostCum1 if e(sample)
sum AdFarRostCum1 if e(sample)
sum Rost if e(sample)


*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
sum AdFRostCum1 if e(sample)
sum Rost if e(sample)

qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum AdMorRostCum1 if e(sample)
sum AdFarRostCum1 if e(sample)
sum Rost if e(sample)


*Ownbirth and foreign adoptees combined
***TABLE A7***
qui reg Rost `AllaFor' if FAlla==1, cluster(LopNrMor)
lincom FRostCum1
lincom c.FRostCum1#c.EjAdoption
sum FRostCum1 if e(sample)
sum Rost if e(sample)


qui reg Rost `AllaMF' if FAlla==1, cluster(LopNrMor)
lincom MorRostCum1
lincom FarRostCum1
lincom c.MorRostCum1#c.EjAdoption
lincom c.FarRostCum1#c.EjAdoption
sum MorRostCum1 if e(sample)
sum FarRostCum1 if e(sample)
sum Rost if e(sample)

restore




*Test if diff between maternal and paternal transmission is conditioned by election year
*The parameter of interest is the diff in two interaction effects:
*maternal voting interacted with maternal age at election and
*paternal voting interacted with paternal age at election and;
*controls for interaction terms between maternal and paternal voting
*all covariates:
*a positive diff implies that the diff in transmission rates between
*mothers and father increases the older the parents are

preserve

drop if ValAr==4

gen BioMorElectionAlder = 2010-BioMorFodAr-40 if ValAr==5
replace BioMorElectionAlder = 1994-BioMorFodAr-40 if ValAr==4
replace BioMorElectionAlder = 1994-BioMorFodAr-40 if ValAr==3
replace BioMorElectionAlder = 1982-BioMorFodAr-40 if ValAr==2
gen BioFarElectionAlder = 2010-BioFarFodAr-40 if ValAr==5
replace BioFarElectionAlder = 1994-BioFarFodAr-40 if ValAr==4
replace BioFarElectionAlder = 1994-BioFarFodAr-40 if ValAr==3
replace BioFarElectionAlder = 1982-BioFarFodAr-40 if ValAr==2
gen AdMorElectionAlder = 2010-AdMorFodAr-40 if ValAr==5
replace AdMorElectionAlder = 1994-AdMorFodAr-40 if ValAr==4
replace AdMorElectionAlder = 1994-AdMorFodAr-40 if ValAr==3
replace AdMorElectionAlder = 1982-AdMorFodAr-40 if ValAr==2
gen AdFarElectionAlder = 2010-AdFarFodAr-40 if ValAr==5
replace AdFarElectionAlder = 1994-AdFarFodAr-40 if ValAr==4
replace AdFarElectionAlder = 1994-AdFarFodAr-40 if ValAr==3
replace AdFarElectionAlder = 1982-AdFarFodAr-40 if ValAr==2

local EjAdoptMF "c.BioMorRostCum1#c.Kon c.BioFarRostCum1#c.Kon c.BioMorRostCum1#c.ValAr c.BioFarRostCum1#c.ValAr c.BioMorRostCum1#c.ValAlder c.BioFarRostCum1#c.ValAlder BioMorRostCum1 BioFarRostCum1 i.BioMorFodAr i.BioFarFodAr Kon i.ValAlder i.ValAr c.BioMorRostCum1#c.BioMorElectionAlder c.BioFarRostCum1#c.BioFarElectionAlder"
local InAdoptMF "c.BioMorRostCum1#c.Kon c.BioFarRostCum1#c.Kon c.AdMorRostCum1#c.Kon c.AdFarRostCum1#c.Kon c.BioMorRostCum1#c.ValAr c.BioFarRostCum1#c.ValAr c.AdMorRostCum1#c.ValAr c.AdFarRostCum1#c.ValAr c.BioMorRostCum1#c.ValAlder c.BioFarRostCum1#c.ValAlder c.AdMorRostCum1#c.ValAlder c.AdFarRostCum1#c.ValAlder BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr c.BioMorRostCum1#c.BioMorElectionAlder c.BioFarRostCum1#c.BioFarElectionAlder c.AdMorRostCum1#c.AdMorElectionAlder c.AdFarRostCum1#c.AdFarElectionAlder"
local UtlAdoptMF "c.AdMorRostCum1#c.Kon c.AdFarRostCum1#c.Kon c.AdMorRostCum1#c.ValAr c.AdFarRostCum1#c.ValAr c.AdMorRostCum1#c.ValAlder c.AdFarRostCum1#c.ValAlder AdMorRostCum1 AdFarRostCum1 i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr c.AdMorRostCum1#c.AdMorElectionAlder c.AdFarRostCum1#c.AdFarElectionAlder"

*Ownbirth
qui reg Rost `EjAdoptMF' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioMorRostCum1
lincom c.BioMorRostCum1#c.BioMorElectionAlder
lincom BioFarRostCum1
lincom c.BioFarRostCum1#c.BioFarElectionAlder
lincom c.BioMorRostCum1#c.BioMorElectionAlder - c.BioFarRostCum1#c.BioFarElectionAlder
sum Rost if e(sample)

*Native adoptees
qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom c.BioMorRostCum1#c.BioMorElectionAlder
lincom BioFarRostCum1
lincom c.BioFarRostCum1#c.BioFarElectionAlder
lincom c.BioMorRostCum1#c.BioMorElectionAlder - c.BioFarRostCum1#c.BioFarElectionAlder
lincom AdMorRostCum1
lincom c.AdMorRostCum1#c.AdMorElectionAlder
lincom AdFarRostCum1
lincom c.AdFarRostCum1#c.AdFarElectionAlder
lincom c.AdMorRostCum1#c.AdMorElectionAlder - c.AdFarRostCum1#c.AdFarElectionAlder
sum Rost if e(sample)

*Foreign adoptees
qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom c.AdMorRostCum1#c.AdMorElectionAlder
lincom AdFarRostCum1
lincom c.AdFarRostCum1#c.AdFarElectionAlder
lincom c.AdMorRostCum1#c.AdMorElectionAlder - c.AdFarRostCum1#c.AdFarElectionAlder
sum Rost if e(sample)

restore


set mat 3000


***Interaction across age***

***FIGURE 2/TABLE A13***

preserve

drop if ValAr==4

local EjAdoptFor "BioFRostCum1 c.BioFRostCum1#c.ValAlder01 i.BioFFodAr#c.ValAlder01 i.BioFFodAr i.BioFFodAr#c.ValAlder01 Kon c.Kon#c.ValAlder01 i.ValAlder i.ValAr i.ValAr#c.ValAlder01"
local InAdoptFor "BioFRostCum1 c.BioFRostCum1#c.ValAlder01 AdFRostCum1 c.AdFRostCum1#c.ValAlder01 i.BioFFodAr i.BioFFodAr#c.ValAlder01 i.AdFFodAr i.AdFFodAr#c.ValAlder01 Kon c.Kon#c.ValAlder01 i.ValAlder i.ValAr i.ValAr#c.ValAlder01"
local UtlAdoptFor "AdFRostCum1 c.AdFRostCum1#c.ValAlder01 i.AdFFodAr i.AdFFodAr#c.ValAlder01 Kon c.Kon#c.ValAlder01 i.ValAlder i.ValAr i.ValAr#c.ValAlder01"
local AllaFor "FRostCum1 c.FRostCum1#c.ValAlder01 c.FRostCum1#c.EjAdoption c.FRostCum1#c.EjAdoption#c.ValAlder01 EjAdoption c.ValAlder01#c.EjAdoption i.FFodAr##c.EjAdoption i.FFodAr#c.ValAlder01 i.FFodAr#c.ValAlder01#c.EjAdoption c.Kon##c.EjAdoption c.Kon#c.ValAlder01 c.Kon#c.ValAlder01#c.EjAdoption i.ValAlder##c.EjAdoption i.ValAr##c.EjAdoption i.ValAr#c.ValAlder01 i.ValAr#c.ValAlder01#c.EjAdoption"


*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.ValAlder01
lincom BioFRostCum1 + c.BioFRostCum1#c.ValAlder01
sum Rost if e(sample)

*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.ValAlder01
lincom BioFRostCum1 + c.BioFRostCum1#c.ValAlder01
lincom AdFRostCum1
lincom c.AdFRostCum1#c.ValAlder01
lincom AdFRostCum1 + c.AdFRostCum1#c.ValAlder01
sum Rost if e(sample)

*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
lincom c.AdFRostCum1#c.ValAlder01
lincom AdFRostCum1 + c.AdFRostCum1#c.ValAlder01
sum Rost if e(sample)

restore



***Interaction across parental turnout stability***

***FIGURE 2/TABLE A13***

preserve

drop if ValAr==4

local EjAdoptFor "c.BioFRostCum1##c.BioFStabil i.BioFFodAr##c.BioFStabil c.Kon##c.BioFStabil i.ValAlder##c.BioFStabil i.ValAr##c.BioFStabil"
local InAdoptFor "c.BioFRostCum1##c.AdFStabil c.AdFRostCum1##c.AdFStabil i.BioFFodAr##c.AdFStabil i.AdFFodAr##c.AdFStabil c.Kon##c.AdFStabil i.ValAlder##c.AdFStabil i.ValAr##c.AdFStabil"
local UtlAdoptFor "c.AdFRostCum1##c.AdFStabil i.AdFFodAr##c.AdFStabil c.Kon##c.AdFStabil i.ValAlder##c.AdFStabil i.ValAr##c.AdFStabil"
local AllaFor "c.FRostCum1##c.FStabil##c.EjAdoption i.FFodAr##c.FStabil##c.EjAdoption c.Kon##c.FStabil##c.EjAdoption i.ValAlder##c.FStabil##c.EjAdoption i.ValAr##c.FStabil##c.EjAdoption"


*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.BioFStabil
lincom BioFRostCum1 + c.BioFRostCum1#c.BioFStabil
sum Rost if e(sample)
tab BioFStabil if e(sample)

*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.AdFStabil
lincom BioFRostCum1 + c.BioFRostCum1#c.AdFStabil
lincom AdFRostCum1
lincom c.AdFRostCum1#c.AdFStabil
lincom AdFRostCum1 + c.AdFRostCum1#c.AdFStabil
sum Rost if e(sample)
tab AdFStabil if e(sample)

*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
lincom c.AdFRostCum1#c.AdFStabil
lincom AdFRostCum1 + c.AdFRostCum1#c.AdFStabil
sum Rost if e(sample)
tab AdFStabil if e(sample)

restore




***Interaction across living in parental home or not***

***FIGURE 2/TABLE A13***

preserve

drop if ValAr==4

local EjAdoptFor "c.BioFRostCum1##c.SammaFamId i.BioFFodAr##c.SammaFamId c.Kon##c.SammaFamId i.ValAlder##c.SammaFamId i.ValAr##c.SammaFamId"
local InAdoptFor "c.BioFRostCum1##c.SammaFamId c.AdFRostCum1##c.SammaFamId i.BioFFodAr##c.SammaFamId i.AdFFodAr##c.SammaFamId c.Kon##c.SammaFamId i.ValAlder##c.SammaFamId i.ValAr##c.SammaFamId"
local UtlAdoptFor "c.AdFRostCum1##c.SammaFamId i.AdFFodAr##c.SammaFamId c.Kon##c.SammaFamId i.ValAlder##c.SammaFamId i.ValAr##c.SammaFamId"
local AllaFor "c.FRostCum1##c.SammaFamId##c.EjAdoption i.FFodAr##c.SammaFamId##c.EjAdoption c.Kon##c.SammaFamId##c.EjAdoption i.ValAlder##c.SammaFamId##c.EjAdoption i.ValAr##c.SammaFamId##c.EjAdoption"

*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.SammaFamId
lincom BioFRostCum1 + c.BioFRostCum1#c.SammaFamId
sum Rost if e(sample)

*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.SammaFamId
lincom BioFRostCum1 + c.BioFRostCum1#c.SammaFamId
lincom AdFRostCum1
lincom c.AdFRostCum1#c.SammaFamId
lincom AdFRostCum1 + c.AdFRostCum1#c.SammaFamId
sum Rost if e(sample)

*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
lincom c.AdFRostCum1#c.SammaFamId
lincom AdFRostCum1 + c.AdFRostCum1#c.SammaFamId
sum Rost if e(sample)

restore


***Interaction across age, living at home and parental consistency***

***FIGURE 3/TABLE A14***

preserve

drop if ValAr==4

local EjAdoptFor "c.BioFRostCum1##c.SammaFamId i.BioFFodAr##c.SammaFamId c.Kon##c.SammaFamId i.ValAlder##c.SammaFamId i.ValAr##c.SammaFamId c.BioFRostCum1##c.BioFStabil i.BioFFodAr##c.BioFStabil c.Kon##c.BioFStabil i.ValAlder##c.BioFStabil i.ValAr##c.BioFStabil BioFRostCum1 c.BioFRostCum1#c.ValAlder01 i.BioFFodAr#c.ValAlder01 i.BioFFodAr i.BioFFodAr#c.ValAlder01 Kon c.Kon#c.ValAlder01 i.ValAlder i.ValAr i.ValAr#c.ValAlder01"
local InAdoptFor "c.BioFRostCum1##c.SammaFamId c.AdFRostCum1##c.SammaFamId i.BioFFodAr##c.SammaFamId i.AdFFodAr##c.SammaFamId c.Kon##c.SammaFamId i.ValAlder##c.SammaFamId i.ValAr##c.SammaFamId c.BioFRostCum1##c.AdFStabil c.AdFRostCum1##c.AdFStabil i.BioFFodAr##c.AdFStabil i.AdFFodAr##c.AdFStabil c.Kon##c.AdFStabil i.ValAlder##c.AdFStabil i.ValAr##c.AdFStabil BioFRostCum1 c.BioFRostCum1#c.ValAlder01 AdFRostCum1 c.AdFRostCum1#c.ValAlder01 i.BioFFodAr i.BioFFodAr#c.ValAlder01 i.AdFFodAr i.AdFFodAr#c.ValAlder01 Kon c.Kon#c.ValAlder01 i.ValAlder i.ValAr i.ValAr#c.ValAlder01"
local UtlAdoptFor "c.AdFRostCum1##c.SammaFamId i.AdFFodAr##c.SammaFamId c.Kon##c.SammaFamId i.ValAlder##c.SammaFamId i.ValAr##c.SammaFamId c.AdFRostCum1##c.AdFStabil i.AdFFodAr##c.AdFStabil c.Kon##c.AdFStabil i.ValAlder##c.AdFStabil i.ValAr##c.AdFStabil AdFRostCum1 c.AdFRostCum1#c.ValAlder01 i.AdFFodAr i.AdFFodAr#c.ValAlder01 Kon c.Kon#c.ValAlder01 i.ValAlder i.ValAr i.ValAr#c.ValAlder01"
local AllaFor "c.FRostCum1##c.SammaFamId##c.EjAdoption i.FFodAr##c.SammaFamId##c.EjAdoption c.Kon##c.SammaFamId##c.EjAdoption i.ValAlder##c.SammaFamId##c.EjAdoption i.ValAr##c.SammaFamId##c.EjAdoption c.FRostCum1##c.FStabil##c.EjAdoption i.FFodAr##c.FStabil##c.EjAdoption c.Kon##c.FStabil##c.EjAdoption i.ValAlder##c.FStabil##c.EjAdoption i.ValAr##c.FStabil##c.EjAdoption FRostCum1 c.FRostCum1#c.ValAlder01 c.FRostCum1#c.EjAdoption c.FRostCum1#c.ValAlder01#c.EjAdoption EjAdoption i.FFodAr##c.EjAdoption i.FFodAr#c.ValAlder01 i.FFodAr#c.ValAlder01#c.EjAdoption c.Kon##c.EjAdoption c.Kon#c.ValAlder01 c.Kon#c.ValAlder01#c.EjAdoption i.ValAlder##c.EjAdoption i.ValAr##c.EjAdoption i.ValAr#c.ValAlder01 i.ValAr#c.ValAlder01#c.EjAdoption"


*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.ValAlder01
lincom c.BioFRostCum1#c.BioFStabil
lincom c.BioFRostCum1#c.SammaFamId
*Max and min transmission
lincom BioFRostCum1 + c.BioFRostCum1#c.ValAlder01
lincom BioFRostCum1 + c.BioFRostCum1#c.BioFStabil + c.BioFRostCum1#c.SammaFamId
sum Rost if e(sample)

*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
lincom c.BioFRostCum1#c.ValAlder01
lincom c.AdFRostCum1#c.ValAlder01
lincom c.BioFRostCum1#c.AdFStabil
lincom c.AdFRostCum1#c.AdFStabil
lincom c.BioFRostCum1#c.SammaFamId
lincom c.AdFRostCum1#c.SammaFamId
*Max and min transmission
lincom BioFRostCum1 + c.BioFRostCum1#c.ValAlder01
lincom BioFRostCum1 + c.BioFRostCum1#c.AdFStabil + c.BioFRostCum1#c.SammaFamId
lincom AdFRostCum1 + c.AdFRostCum1#c.ValAlder01
lincom AdFRostCum1 + c.AdFRostCum1#c.AdFStabil + c.AdFRostCum1#c.SammaFamId
sum Rost if e(sample)

*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
lincom c.AdFRostCum1#c.ValAlder01
lincom c.AdFRostCum1#c.AdFStabil
lincom c.AdFRostCum1#c.SammaFamId
*Max and min transmission
lincom AdFRostCum1 + c.AdFRostCum1#c.ValAlder01
lincom AdFRostCum1 + c.AdFRostCum1#c.AdFStabil + c.AdFRostCum1#c.SammaFamId
sum Rost if e(sample)

restore






*******************
*APPENDIX MODELS*
*******************

*******************************************
*BASELINE RESULTS WITHOUT AGE RESTRICTIONS*
*******************************************

***TABLE A8***

use "E:\ProjData\AdoptionStudy/SampleStacked.dta", clear

set mat 2000

keep if Rost!=.

drop if ValAr==4


local EjAdoptFor "BioFRostCum1 i.BioFFodAr Kon i.ValAlder i.ValAr"
local EjAdoptMF "BioMorRostCum1 BioFarRostCum1 i.BioMorFodAr i.BioFarFodAr Kon i.ValAlder i.ValAr"
local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptFor "AdFRostCum1 i.AdFFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptMF "AdMorRostCum1 AdFarRostCum1 i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"

*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum1
sum Rost if e(sample)

qui reg Rost `EjAdoptMF' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
sum Rost if e(sample)


*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)


*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)



*******
*LOGIT*
*******
***Transmission across two generations - baseline - logit***
*Use birth-year categories in order for all models to converge

***TABLE A9***

use "E:\ProjData\AdoptionStudy/SampleStacked.dta", clear

set mat 2000

keep if Rost!=.
keep if inrange(ValAlder, 0, 32)
keep if inrange(ValAr, 2, 5)


preserve

drop if ValAr==4

foreach var in BioFFodAr AdFFodAr FFodAr BioMorFodAr BioFarFodAr AdMorFodAr AdFarFodAr MorFodAr FarFodAr {
gen `var'Kat = 1 if inrange(`var', 1800, 1910)
replace `var'Kat = 2 if inrange(`var', 1911, 1920)
replace `var'Kat = 3 if inrange(`var', 1921, 1930)
replace `var'Kat = 4 if inrange(`var', 1931, 1940)
replace `var'Kat = 5 if inrange(`var', 1941, 1950)
replace `var'Kat = 6 if inrange(`var', 1951, 1992)
}

gen ValAlderKat = 1 if inrange(ValAlder, 0, 5)
replace ValAlderKat = 2 if inrange(ValAlder, 6, 11)
replace ValAlderKat = 3 if inrange(ValAlder, 12, 17)
replace ValAlderKat = 4 if inrange(ValAlder, 18, 22)
replace ValAlderKat = 5 if inrange(ValAlder, 23, 27)
replace ValAlderKat = 6 if inrange(ValAlder, 28, 32)

local EjAdoptFor "BioFRostCum1 i.BioFFodArKat Kon i.ValAlderKat i.ValAr"
local EjAdoptMF "BioMorRostCum1 BioFarRostCum1 i.BioMorFodArKat i.BioFarFodArKat Kon i.ValAlderKat i.ValAr"
local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodArKat i.AdFFodArKat Kon i.ValAlderKat i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodArKat i.BioFarFodArKat i.AdMorFodArKat i.AdFarFodArKat Kon i.ValAlderKat i.ValAr"
local UtlAdoptFor "AdFRostCum1 i.AdFFodArKat Kon i.ValAlderKat i.ValAr"
local UtlAdoptMF "AdMorRostCum1 AdFarRostCum1 i.AdMorFodArKat i.AdFarFodArKat Kon i.ValAlderKat i.ValAr"

*Ownbirth
qui logit Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
margins, dydx(BioFRostCum1)
lincom BioFRostCum1
sum Rost if e(sample)


qui logit Rost `EjAdoptMF' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
margins, dydx(BioMorRostCum1)
margins, dydx(BioFarRostCum1)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom BioMorRostCum1 - BioFarRostCum1
sum Rost if e(sample)


*Native adoptees
qui logit Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
margins, dydx(BioFRostCum1)
margins, dydx(AdFRostCum1)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)


qui logit Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
margins, dydx(BioMorRostCum1)
margins, dydx(BioFarRostCum1)
margins, dydx(AdMorRostCum1)
margins, dydx(AdFarRostCum1)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
lincom BioMorRostCum1 + AdMorRostCum1
lincom BioFarRostCum1 + AdFarRostCum1
lincom BioMorRostCum1 - BioFarRostCum1
lincom AdMorRostCum1 - AdFarRostCum1
sum Rost if e(sample)


*Foreign adoptees
qui logit Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
margins, dydx(AdFRostCum1)
lincom AdFRostCum1
sum Rost if e(sample)


qui logit Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
margins, dydx(AdMorRostCum1)
margins, dydx(AdFarRostCum1)
lincom AdMorRostCum1
lincom AdFarRostCum1
lincom AdMorRostCum1 - AdFarRostCum1
sum Rost if e(sample)

restore


***********************
*CONTROL FOR EDUCATION*
***********************
***TABLES A10 AND A11***

preserve

drop if ValAr==4

***Transmission across two generations - baseline with control for status (educational attainment) transmission***
local EjAdoptFor "BioFRostCum1 i.BioFFodAr Kon i.ValAlder i.ValAr"
local EjAdoptMF "BioMorRostCum1 BioFarRostCum1 i.BioMorFodAr i.BioFarFodAr Kon i.ValAlder i.ValAr"
local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptFor "AdFRostCum1 i.AdFFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptMF "AdMorRostCum1 AdFarRostCum1 i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"


*Ownbirth
qui reg Rost `EjAdoptFor' UtbAr BioFUtbAr if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum1
lincom UtbAr
lincom BioFUtbAr
sum Rost if e(sample)

qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1 & e(sample), cluster(LopNrBioMor)
lincom BioFRostCum1
sum Rost if e(sample)

qui reg Rost `EjAdoptMF' UtbAr BioMorUtbAr BioFarUtbAr if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom UtbAr
lincom BioMorUtbAr
lincom BioFarUtbAr
sum Rost if e(sample)

qui reg Rost `EjAdoptMF' if Adoption!=1 & BioFAlla==1 & e(sample), cluster(LopNrBioMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
sum Rost if e(sample)


*Native adoptees
qui reg Rost `InAdoptFor' UtbAr AdFUtbAr if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
lincom UtbAr
lincom AdFUtbAr
sum Rost if e(sample)

qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMF' UtbAr AdMorUtbAr AdFarUtbAr if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
lincom UtbAr
lincom AdMorUtbAr
lincom AdFarUtbAr
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)


*Foreign adoptees
qui reg Rost `UtlAdoptFor' UtbAr AdFUtbAr if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
lincom UtbAr
lincom AdFUtbAr
sum Rost if e(sample)

qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `UtlAdoptMF' UtbAr AdMorUtbAr AdFarUtbAr if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
lincom UtbAr
lincom AdMorUtbAr
lincom AdFarUtbAr
sum Rost if e(sample)

qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)


restore




***********************************
*USE REFERENDUM IN 1994 AS OUTCOME*
***********************************

***TABLE A12***

preserve

keep if ValAr==4

local EjAdoptFor "BioFRostCum17082 i.BioFFodAr Kon i.ValAlder i.ValAr"
local EjAdoptMF "BioMorRostCum17082 BioFarRostCum17082 i.BioMorFodAr i.BioFarFodAr Kon i.ValAlder i.ValAr"
local InAdoptFor "BioFRostCum17082 AdFRostCum17082 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum17082 BioFarRostCum17082 AdMorRostCum17082 AdFarRostCum17082 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptFor "AdFRostCum17082 i.AdFFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptMF "AdMorRostCum17082 AdFarRostCum17082 i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"


***Transmission across two generations - baseline***
*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum17082
sum Rost if e(sample)

qui reg Rost `EjAdoptMF' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioMorRostCum17082
lincom BioFarRostCum17082
sum Rost if e(sample)


*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum17082
lincom AdFRostCum17082
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioMorRostCum17082
lincom BioFarRostCum17082
lincom AdMorRostCum17082
lincom AdFarRostCum17082
sum Rost if e(sample)


*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum17082
sum Rost if e(sample)

qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdMorRostCum17082
lincom AdFarRostCum17082
sum Rost if e(sample)

restore



***********************
*Parental correlations*
***********************

*Keep only one obs per child
preserve

drop if ValAr==4

bysort LopNr: gen occ = _n

pwcorr BioMorRostCum1 AdMorRostCum1 if AdoptionSv==1 & AdFAlla==1 & occ==1, sig
pwcorr BioMorRostCum1 AdFarRostCum1 if AdoptionSv==1 & AdFAlla==1 & occ==1, sig
pwcorr BioFarRostCum1 AdMorRostCum1 if AdoptionSv==1 & AdFAlla==1 & occ==1, sig
pwcorr BioFarRostCum1 AdFarRostCum1 if AdoptionSv==1 & AdFAlla==1 & occ==1, sig

pwcorr BioMorUtbAr AdMorUtbAr if AdoptionSv==1 & AdFAlla==1 & occ==1, sig
pwcorr BioMorUtbAr AdFarUtbAr if AdoptionSv==1 & AdFAlla==1 & occ==1, sig
pwcorr BioFarUtbAr AdMorUtbAr if AdoptionSv==1 & AdFAlla==1 & occ==1, sig
pwcorr BioFarUtbAr AdFarUtbAr if AdoptionSv==1 & AdFAlla==1 & occ==1, sig

pwcorr BioMorKlass AdMorKlass if AdoptionSv==1 & AdFAlla==1 & occ==1, sig
pwcorr BioMorKlass AdFarKlass if AdoptionSv==1 & AdFAlla==1 & occ==1, sig
pwcorr BioFarKlass AdMorKlass if AdoptionSv==1 & AdFAlla==1 & occ==1, sig
pwcorr BioFarKlass AdFarKlass if AdoptionSv==1 & AdFAlla==1 & occ==1, sig

restore



**************************************************
*Drop parental turnout (only for native adoptees)*
**************************************************

***TABLE A1***

preserve

drop if ValAr==4

local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local InAdoptForEjBio "AdFRostCum1 i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMFEjBio "AdMorRostCum1 AdFarRostCum1 i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local InAdoptForEjAd "BioFRostCum1 i.BioFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMFEjAd "BioMorRostCum1 BioFarRostCum1 i.BioMorFodAr i.BioFarFodAr Kon i.ValAlder i.ValAr"

*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptForEjBio' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptForEjAd' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioFRostCum1
sum Rost if e(sample)


qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMFEjBio' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMFEjAd' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
sum Rost if e(sample)

restore




*****************************************************************
*Include parental education and class (only for native adoptees)*
*****************************************************************

***TABLE A2***

preserve

drop if ValAr==4

local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local InAdoptForSESBio "BioFRostCum1 AdFRostCum1 BioFKlass BioFUtbAr i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptForSESAd "BioFRostCum1 AdFRostCum1 AdFUtbAr AdFKlass i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMFSESBio "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 BioMorUtbAr BioFarUtbAr BioMorKlass BioFarKlass i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local InAdoptMFSESAd "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 AdMorUtbAr AdFarUtbAr AdMorKlass AdFarKlass i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"


*Native adoptees
*Add birth parent characteristics
qui reg Rost `InAdoptForSESBio' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

*Add birth adoptive characteristics
qui reg Rost `InAdoptForSESAd' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)


*Add birth parent characteristics
qui reg Rost `InAdoptMFSESBio' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

*Add adoptive parent characteristics
qui reg Rost `InAdoptMFSESAd' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

restore



****************************************************************************************************************
*RESTRICT TO CHILDREN AND PARENTS LIVING IN DIFFERENT COUNTIES ALL YEARS FROM 1968 TO THE TIME OF THE ELECTIONS*
****************************************************************************************************************

***TABLE A3***

preserve

drop if ValAr==4

local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"

***Transmission across two generations - baseline***
*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & SammaLan==0, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 & SammaLan==0, cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

restore





**************
*RE-weighting*
**************

***TABLE A4***

*Re-weight the adoption samples to be more like the non-adoptee sample:
*1) Re-weight bio parents of native adoptees to be more like parents of non-adoptees
*2) Re-weight adopt parents of native adoptees to be more like parents of non-adoptees
*3) Re-weight adopt parents of foregin adoptees to be more like parents of non-adoptees
*Use parental age and eduation as covariates to create the weight/inverse propensity scores

preserve

drop if ValAr==4

*Generate outcomes
gen SvAdopt = 0 if Adoption==.
replace SvAdopt = 1 if AdoptionSv==1

gen UtlAdopt = 0 if Adoption==.
replace UtlAdopt = 1 if AdoptionUtl==1

*Generate parental covariates
foreach var in BioFFodAr AdFFodAr FFodAr BioMorFodAr BioFarFodAr AdMorFodAr AdFarFodAr MorFodAr FarFodAr {
gen `var'Kat = 1 if inrange(`var', 1800, 1910)
replace `var'Kat = 2 if inrange(`var', 1911, 1920)
replace `var'Kat = 3 if inrange(`var', 1921, 1930)
replace `var'Kat = 4 if inrange(`var', 1931, 1940)
replace `var'Kat = 5 if inrange(`var', 1941, 1950)
replace `var'Kat = 6 if inrange(`var', 1951, 1992)
}

gen FodArKatForSvBio = BioFFodArKat
gen UtbArForSvBio = BioFUtbAr
gen KlassForSvBio = BioFKlass

gen FodArKatForSvAd = BioFFodArKat if Adoption!=1
replace FodArKatForSvAd = AdFFodArKat if AdoptionSv==1
gen UtbArForSvAd = BioFUtbAr if Adoption!=1
replace UtbArForSvAd = AdFUtbAr if AdoptionSv==1
gen KlassForSvAd = BioFKlass if Adoption!=1
replace KlassForSvAd = AdFKlass if AdoptionSv==1

gen FodArKatForUtlAd = BioFFodArKat if Adoption!=1
replace FodArKatForUtlAd = AdFFodArKat if AdoptionUtl==1
gen UtbArForUtlAd = BioFUtbAr if Adoption!=1
replace UtbArForUtlAd = AdFUtbAr if AdoptionUtl==1
gen KlassForUtlAd = BioFKlass if Adoption!=1
replace KlassForUtlAd = AdFKlass if AdoptionUtl==1


*Generate weights
bysort LopNr: gen occ = _n

qui logit SvAdopt i.FodArKatForSvBio c.UtbArForSvBio##c.UtbArForSvBio KlassForSvBio if occ==1
predict PSvBioFor

qui logit SvAdopt i.FodArKatForSvAd c.UtbArForSvAd##c.UtbArForSvAd KlassForSvAd if occ==1
predict PSvAdFor

qui logit UtlAdopt i.FodArKatForUtlAd c.UtbArForUtlAd##c.UtbArForUtlAd KlassForUtlAd if occ==1
predict PUtlAdFor


local EjAdoptFor "BioFRostCum1 i.BioFFodAr Kon i.ValAlder i.ValAr"
local EjAdoptMF "BioMorRostCum1 BioFarRostCum1 i.BioMorFodAr i.BioFarFodAr Kon i.ValAlder i.ValAr"
local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptFor "AdFRostCum1 i.AdFFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptMF "AdMorRostCum1 AdFarRostCum1 i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local AllaFor "c.FRostCum1##c.EjAdoption i.FFodAr##c.EjAdoption c.Kon##c.EjAdoption i.ValAlder##c.EjAdoption i.ValAr##c.EjAdoption"
local AllaMF "c.MorRostCum1##c.EjAdoption c.FarRostCum1##c.EjAdoption i.MorFodAr##c.EjAdoption i.FarFodAr##c.EjAdoption c.Kon##c.EjAdoption i.ValAlder##c.EjAdoption i.ValAr##c.EjAdoption"

*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & PSvBioFor!=. & PSvAdFor!=.
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & e(sample) [pw=1/PSvBioFor], cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & e(sample) [pw=1/PSvAdFor], cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)


qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 & PSvBioFor!=. & PSvAdFor!=.
qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 & e(sample) [pw=1/PSvBioFor], cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1  & e(sample) [pw=1/PSvAdFor], cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)


*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1 [pw=1/PUtlAdFor], cluster(LopNrAdMor)
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdFRostCum1
sum Rost if e(sample)


qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1 [pw=1/PUtlAdFor], cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)


restore



***TABLE A5***

*Re-weight the adoption samples in terms of the population age distribution for those aged 18-50 at each election:
*1) Re-weight the native adoptees to be more like ownbirth children
*2) Re-weight the foreign adoptees to be more like ownbirth children
*Use birth-year fixed effects as covariates to create the weight/inverse propensity scores

preserve

drop if ValAr==4


*Generate outcomes
gen FodArKat = 1 if inrange(FodAr, 1932, 1941)
replace FodArKat = 2 if inrange(FodAr, 1942, 1951)
replace FodArKat = 3 if inrange(FodAr, 1952, 1961)
replace FodArKat = 4 if inrange(FodAr, 1962, 1971)
replace FodArKat = 5 if inrange(FodAr, 1972, 1981)
replace FodArKat = 6 if inrange(FodAr, 1982, 1992)

gen SvAdopt = 0 if Adoption==.
replace SvAdopt = 1 if AdoptionSv==1

gen UtlAdopt = 0 if Adoption==.
replace UtlAdopt = 1 if AdoptionUtl==1


bysort LopNr: gen occ = _n

*Generate weights
qui logit SvAdopt i.FodArKat if occ==1
predict PSvAdopt

qui logit UtlAdopt i.FodArKat if occ==1
predict PUtlAdopt


local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptFor "AdFRostCum1 i.AdFFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptMF "AdMorRostCum1 AdFarRostCum1 i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"

*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 [pw=1/PSvAdopt], cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & e(sample) , cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

tab PSvAdopt if e(sample)



qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 [pw=1/PSvAdopt], cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)





*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1 [pw=1/PUtlAdopt], cluster(LopNrAdMor)
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdFRostCum1
sum Rost if e(sample)

tab PUtlAdopt if e(sample)



qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1 [pw=1/PUtlAdopt], cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)


restore


***TABLE A6***

*Re-weight the adoption samples to be more like each other (in terms of age and education):
*1) Re-weight the native adoptees to be more like foreign adoptees
*2) Re-weight the foreign adoptees to be more like native adoptees
*Use birth-year fixed effects and eduation as covariates to create the weight/inverse propensity scores

preserve

drop if ValAr==4


*Generate outcomes
gen FodArKat = 1 if inrange(FodAr, 1932, 1941)
replace FodArKat = 2 if inrange(FodAr, 1942, 1951)
replace FodArKat = 3 if inrange(FodAr, 1952, 1961)
replace FodArKat = 4 if inrange(FodAr, 1962, 1971)
replace FodArKat = 5 if inrange(FodAr, 1972, 1981)
replace FodArKat = 6 if inrange(FodAr, 1982, 1992)

gen SvAdopt = 0 if AdoptionUtl==1
replace SvAdopt = 1 if AdoptionSv==1

gen UtlAdopt = 0 if AdoptionSv==1
replace UtlAdopt = 1 if AdoptionUtl==1


bysort LopNr: gen occ = _n

*Generate weights
logit SvAdopt i.FodArKat if occ==1
predict PSvAdopt

logit SvAdopt i.FodArKat if occ==1
predict PUtlAdopt


local InAdoptFor "BioFRostCum1 AdFRostCum1 i.BioFFodAr i.AdFFodAr Kon i.ValAlder i.ValAr"
local InAdoptMF "BioMorRostCum1 BioFarRostCum1 AdMorRostCum1 AdFarRostCum1 i.BioMorFodAr i.BioFarFodAr i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptFor "AdFRostCum1 i.AdFFodAr Kon i.ValAlder i.ValAr"
local UtlAdoptMF "AdMorRostCum1 AdFarRostCum1 i.AdMorFodAr i.AdFarFodAr Kon i.ValAlder i.ValAr"


*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 [pw=1/PSvAdopt], cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & e(sample) , cluster(LopNrAdMor)
lincom BioFRostCum1
lincom AdFRostCum1
sum Rost if e(sample)

tab PSvAdopt if e(sample)



qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 [pw=1/PSvAdopt], cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `InAdoptMF' if AdoptionSv==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom BioMorRostCum1
lincom BioFarRostCum1
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)



*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1 [pw=1/PUtlAdopt], cluster(LopNrAdMor)
lincom AdFRostCum1
sum Rost if e(sample)

qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdFRostCum1
sum Rost if e(sample)

tab PUtlAdopt if e(sample)


qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1 [pw=1/PUtlAdopt], cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)

qui reg Rost `UtlAdoptMF' if AdoptionUtl==1 & AdFAlla==1 & e(sample), cluster(LopNrAdMor)
lincom AdMorRostCum1
lincom AdFarRostCum1
sum Rost if e(sample)


restore



**********************************************
*ALTERNATIVE MEASURES OF PARENTAL CONSISTENCY*
**********************************************

***TABLE A16***

***Interaction across parental turnout stability***
****HERFINDAHL***

preserve

drop if ValAr==4

local EjAdoptFor "c.BioFRostCum1##c.BioFStabilHI i.BioFFodAr##c.BioFStabilHI c.Kon##c.BioFStabilHI i.ValAlder##c.BioFStabilHI i.ValAr##c.BioFStabilHI"
local InAdoptFor "c.BioFRostCum1##c.AdFStabilHI c.AdFRostCum1##c.AdFStabilHI i.BioFFodAr##c.AdFStabilHI i.AdFFodAr##c.AdFStabilHI c.Kon##c.AdFStabilHI i.ValAlder##c.AdFStabilHI i.ValAr##c.AdFStabilHI"
local UtlAdoptFor "c.AdFRostCum1##c.AdFStabilHI i.AdFFodAr##c.AdFStabilHI c.Kon##c.AdFStabilHI i.ValAlder##c.AdFStabilHI i.ValAr##c.AdFStabilHI"


*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.BioFStabilHI
sum Rost if e(sample)

*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.AdFStabilHI
lincom AdFRostCum1
lincom c.AdFRostCum1#c.AdFStabilHI
sum Rost if e(sample)

*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
lincom c.AdFRostCum1#c.AdFStabilHI
sum Rost if e(sample)

restore




***Interaction across parental turnout stability***
***Interspousal consistency measure***

preserve

drop if ValAr==4

*Use all voters (no filter) and only first time voters (Filter=1)
gen Filter = .
replace Filter = 1 if inrange(FodArMan, 196110, 196408)
replace Filter = 1 if inrange(FodArMan, 197310, 197608)
replace Filter = 1 if FodArMan==197610
replace Filter = 1 if inrange(FodArMan, 198810, 199208)

local EjAdoptFor "c.BioFRostCum1##c.BioFStabilVal i.BioFFodAr##c.BioFStabilVal c.Kon##c.BioFStabilVal i.ValAlder##c.BioFStabilVal i.ValAr##c.BioFStabilVal"
local InAdoptFor "c.BioFRostCum1##c.AdFStabilVal c.AdFRostCum1##c.AdFStabilVal i.BioFFodAr##c.AdFStabilVal i.AdFFodAr##c.AdFStabilVal c.Kon##c.AdFStabilVal i.ValAlder##c.AdFStabilVal i.ValAr##c.AdFStabilVal"
local UtlAdoptFor "c.AdFRostCum1##c.AdFStabilVal i.AdFFodAr##c.AdFStabilVal c.Kon##c.AdFStabilVal i.ValAlder##c.AdFStabilVal i.ValAr##c.AdFStabilVal"


*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor) 
lincom BioFRostCum1
lincom c.BioFRostCum1#c.BioFStabilVal
sum Rost if e(sample)

qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1 & Filter==1, cluster(LopNrBioMor) 
lincom BioFRostCum1
lincom c.BioFRostCum1#c.BioFStabilVal
sum Rost if e(sample)


*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.AdFStabilVal
lincom AdFRostCum1
lincom c.AdFRostCum1#c.AdFStabilVal
sum Rost if e(sample)

qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1 & Filter==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.AdFStabilVal
lincom AdFRostCum1
lincom c.AdFRostCum1#c.AdFStabilVal
sum Rost if e(sample)


*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
lincom c.AdFRostCum1#c.AdFStabilVal
sum Rost if e(sample)

qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1 & Filter==1, cluster(LopNrAdMor)
lincom AdFRostCum1
lincom c.AdFRostCum1#c.AdFStabilVal
sum Rost if e(sample)

restore



***FIGURE A2***

*Graph distributions of the three consistency measures (pool the three samples)
*Get summary statistics for the consistency measures and cohabitation
preserve

drop if ValAr==4


gen Stabil = BioFStabil if Adoption!=1
replace Stabil = AdFStabil if Adoption==1

gen StabilHI = BioFStabilHI if Adoption!=1
replace StabilHI = AdFStabilHI if Adoption==1

gen StabilVal = BioFStabilVal if Adoption!=1
replace StabilVal = AdFStabilVal if Adoption==1

gen occ = BioFAlla if Adoption!=1
replace occ = AdFAlla if Adoption==1

keep if occ==1
keep if Rost!=.

corr Stabil StabilHI
corr Stabil StabilVal
corr StabilHI StabilVal

tab BioFStabil if Adoption!=1
tab AdFStabil if AdoptionSv==1
tab AdFStabil if AdoptionUtl==1

tab SammaFamId if Adoption!=1
tab SammaFamId if AdoptionSv==1
tab SammaFamId if AdoptionUtl==1


histogram Stabil, percent ///
xscale(range(-.2 1.2)) xlabel(0 "Inconsistent voting" 1 "Consistent voting") graphregion(color(white)) ///
xtitle("") title("Inter- and intra-election parental consistency") bcolor(gs12) barwidth(.02)
graph export "C:\Userdata\Shared\Dofiles\DoAnalysis\AdoptionStudy\Stabil.pdf", as(pdf) replace

histogram StabilHI, percent ///
xscale(range(-.2 1.2)) xlabel(0 "Inconsistent voting" 1 "Consistent voting") graphregion(color(white)) ///
xtitle("") title("Inter- and intra-election parental consistency") bcolor(gs12) barwidth(.02)
graph export "C:\Userdata\Shared\Dofiles\DoAnalysis\AdoptionStudy\StabilHI.pdf", as(pdf) replace

histogram StabilVal, percent ///
xscale(range(-.2 1.2)) xlabel(0 "Inconsistent voting" 1 "Consistent voting") graphregion(color(white)) ///
xtitle("") title("Intra-election parental consistency") bcolor(gs12) barwidth(.02)
graph export "C:\Userdata\Shared\Dofiles\DoAnalysis\AdoptionStudy\StabilVal.pdf", as(pdf) replace

restore





*******************************************************************************************************
*NUMBER OF YEARS SINCE 1968 LIVING IN THE SAME PARISH AS PARENTS - TWO ALTERNATIVE CONTINUOUS MEASURES*
*******************************************************************************************************

***TABLE A15***

*Share of years between 1968 and the year of the election

preserve

drop if ValAr==4

local EjAdoptFor "c.BioFRostCum1##c.SammaForsamlingAndel i.BioFFodAr##c.SammaForsamlingAndel c.Kon##c.SammaForsamlingAndel i.ValAlder##c.SammaForsamlingAndel i.ValAr##c.SammaForsamlingAndel"
local InAdoptFor "c.BioFRostCum1##c.SammaForsamlingAndel c.AdFRostCum1##c.SammaForsamlingAndel i.BioFFodAr##c.SammaForsamlingAndel i.AdFFodAr##c.SammaForsamlingAndel c.Kon##c.SammaForsamlingAndel i.ValAlder##c.SammaForsamlingAndel i.ValAr##c.SammaForsamlingAndel"
local UtlAdoptFor "c.AdFRostCum1##c.SammaForsamlingAndel i.AdFFodAr##c.SammaForsamlingAndel c.Kon##c.SammaForsamlingAndel i.ValAlder##c.SammaForsamlingAndel i.ValAr##c.SammaForsamlingAndel"


*Ownbirth
qui reg Rost `EjAdoptFor' if Adoption!=1 & BioFAlla==1, cluster(LopNrBioMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.SammaForsamlingAndel
sum Rost if e(sample)

*Native adoptees
qui reg Rost `InAdoptFor' if AdoptionSv==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom BioFRostCum1
lincom c.BioFRostCum1#c.SammaForsamlingAndel
lincom AdFRostCum1
lincom c.AdFRostCum1#c.SammaForsamlingAndel
sum Rost if e(sample)

*Foreign adoptees
qui reg Rost `UtlAdoptFor' if AdoptionUtl==1 & AdFAlla==1, cluster(LopNrAdMor)
lincom AdFRostCum1
lincom c.AdFRostCum1#c.SammaForsamlingAndel
sum Rost if e(sample)

restore




log close

exit

